# Contributor: Chloe Kudryavtsev <toast@toastin.space>
# Maintainer: Chloe Kudryavtsev <toast@toastin.space>
pkgname=procs
pkgver=0.10.3
pkgrel=0
pkgdesc="Modern replacement for ps written in Rust"
url="https://github.com/dalance/procs"
arch="x86_64 armv7 armhf !aarch64 x86 ppc64le" # limited by rust/cargo (aarch64 due to MAP_32BIT in nix package)
arch="$arch !armhf !armv7 !x86" # test_run test_run_insert and test_run_tree fail, x86 fails to build
license="MIT"
options="net"
makedepends="cargo"
source="procs-$pkgver.tar.gz::https://github.com/dalance/procs/archive/v$pkgver.tar.gz"

export CARGO_HOME="$srcdir"/cargo

build() {
	cargo build \
		--release \
		--verbose \
		--locked
}

check() {
	cargo test --all \
		--release \
		--verbose \
		--locked
}

package() {
	install -Dm755 target/release/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
}

sha512sums="c07cf92b4ae576fb7e07f335e854075c123a5c9df1b03f91cec86fc06a060cbfb2dde6dc6ffbd4abcce01f8ceb1ee51d0395194f5174947bb4fc43f926f2982d  procs-0.10.3.tar.gz"
